package com.jokelandave.poc.server.dao;

import com.googlecode.objectify.Objectify;
import com.jokelandave.poc.server.domain.Profile;

public class ProfileDao {
	
	Objectify obj;
	
	public ProfileDao(Objectify obj)
	{
		this.obj = obj;
	}
	
	/**
	 * Gets a user by their userId
	 * @param googleId
	 * @return Profile Object
	 */
	public Profile getProfileByGoogleId(String googleId)
	{
		return obj.query(Profile.class).filter("googleUserId =", googleId).get();
	}
	
	

}
